package midas.mw.interfaces;

/**
 * This interface defines the common methods used by the middleware core (MW_Core) to 
 * control the middleware applications
 */
public interface Application {
	/**
	 * This method is used by the MW_Core to indicate startup of an application
	 * @param middlewareInterface Access to the MW_Core services through the interface 'Mw'
	 * @param Arguments provided to the application when launched
	 * @return 0 if OK. Other value if failure. Failure will terminate the application
	 */
	public int start(Mw middlewareInterface, String args[]);
	
	 /**
	  * This method is used by the MW_Core to indicate to a MW component that it should stop 
	  * @return 0 if OK. Other value if failure. Failure will be ignored by the MW
	  */
	public int stop();
}
